package com.yh.aop;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@Configuration
@EnableAspectJAutoProxy
@ComponentScan("com.yh.aop")
public class AopConfig {
	public AopConfig(){
		System.out.println("------AopConfig--------");
	}

	@Bean
	public Service getService(){
		return new Service();
	}

	@Bean
	public LogAspects logAspects(){
		return new LogAspects();
	}
}
